#include "delay.h"
extern uint16_t	u16DelayMs;

void Delay_ms(uint16_t delay_ms)
{
    while(delay_ms--)
    {
        Delay_us(1000);
    }
}

void Delay_us(uint16_t delay_us)
{
    uint8_t	count;
    while(delay_us--)
    {
        count=3;
        while(count--)
        {
        }
    }
}

uint8_t delay_ms(uint16_t delay_ms)							//<= 6550ms
{
    uint16_t tmp;
    if(delay_ms>6550)
    {
        Delay_ms(5000);
        return 0;
    }
    tmp=delay_ms*10;
    u16DelayMs=0;

    while(u16DelayMs < tmp);

    return 1;
}
